﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="editpaper.aspx.cs" Inherits="OnlineTestUI.BackManager.editpaper" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title></title>
	<script type="text/javascript" src="../scripts/jquery-1.10.2.js"></script>
	<script type="text/javascript" src="../scripts/jquery.dragsort-0.5.2.js"></script>
</head>
<body>
	<form id="form1" runat="server">
		
		<div id="divEditPart">
			<ul id="ulEditPart">
			<%foreach (var item in PqeList)
							  {
								  switch (item.QuestionTypeId)
								  {
									  case 1:%><li>
																																	  <div style="visibility: visible;" tabindex="-1" class="div_question div_question_mouseout">
									  <div class="div_preview">
										  <div class="div_title_question_all">
											  <div class="div_topic_question">1.</div>
											  <div class="div_title_question"><span><%=item.QuestionName%></span></div>
											  <div style="clear: both;"></div>
										  </div>
										  <div class="div_table_radio_question">
											  <div class="div_table_clear_top"></div>
											  <ul>
												  <%foreach (var questionItem in qib.GetModelList("questionid =" + item.QuestionId))
													{%><li style="width: 99%;">
																																						  <input type="radio"/><%=questionItem.ItemName%></li>
												  <%
													}%>

												  
											  </ul>
											  
										  </div>
										  
										  
										  <div style="clear: both;"></div>
									  </div>
								  </div>
																																  </li>
			<%; break;
									  case 2:%><li><div  class="div_question div_question_mouseout">
				<div class="div_preview">
					<div class="div_title_question_all">
						<div class="div_topic_question">1.</div>
						<div class="div_title_question"><span><%=item.QuestionName%></span></div>
						<div style="clear: both;"></div>
					</div>

					
					<div style="clear: both;"></div>
				</div>
			</div></li>
			<%; break;
									  case 3:%><li><div class="div_question div_question_mouseout">
				<div class="div_preview">
					<div class="div_title_question_all">
						<div class="div_topic_question">1.</div>
						<div class="div_title_question"><span><%=item.QuestionName%></span></div>
						<div style="clear: both;"></div>
					</div>
					<div style="clear: both;"></div>
				</div>
			</div></li>
			<%; break;
									  case 4:%><li><div  class="div_question div_question_mouseout">
				<div class="div_preview">
					<div class="div_title_question_all">
						<div class="div_topic_question">1.</div>
						<div class="div_title_question"><span><%=item.QuestionName%></span></div>
						<div style="clear: both;"></div>
					</div>

					
					<div style="clear: both;"></div>
				</div>
			</div></li>
			<%; break;
								  }
							  }%>
			</ul>
			
		

		</div>
		<script type="text/javascript">
			$("#ulEditPart").dragsort({ dragSelector: "li", placeHolderTemplate: "<li class='placeHolder'><div></div></li>" });

			function saveOrder() {
				var data = $("#gallery li").map(function () { return $(this).data("itemid"); }).get();
				$.ajax({ url: "example.aspx/SaveListOrder", data: '{ids:["' + data.join('","') + '"]}', dataType: "json", type: "POST", contentType: "application/json; charset=utf-8" });
			};
		</script>
	</form>
</body>
</html>
